﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using WaterRevenueMS.WebUI.Common;
using System.ComponentModel.Composition;
using WaterRevenueMS.Core.Service.ReadMeterMS;
using WaterRevenueMS.WebUI.Extension.Filters;
using WaterRevenueMS.Domain.Common.Models;
using WaterRevenueMS.Componnent.Entities.ReadMeterMS;
using System.Linq.Expressions;
using WaterRevenueMS.WebUI.Extension.MvcHelper;
namespace WaterRevenueMS.WebUI.Controllers
 {
     [HandleError]
    public class AQController : AdminController
     {
         public ActionResult Index()
         {
             return View();
         }
 
         public string upload()
         {
             HttpFileCollectionBase files = HttpContext.Request.Files;
             for (int iFile = 0; iFile < files.Count; iFile++)
             {
                 HttpPostedFileBase postedFile = files[iFile];
                 string fileName = System.IO.Path.GetFileName(postedFile.FileName);
                 if (fileName != null && fileName != string.Empty)
                 {
                    postedFile.SaveAs(Server.MapPath("~/file/" + DateTime.Now.Ticks.ToString() + fileName));
                 }
             }
 
             Response.Write(string.Format("<script type='text/javascript'>window.parent.ss();</script>"));
             return string.Empty;
         }
     }
 }
